package com.zhuss.repair.processor;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.zhuss.bean.bo.repair.repair.SearchRepairBo;
import com.zhuss.bean.vo.core.user.ListUserVo;
import com.zhuss.bean.vo.repair.repair.ListRepairVo;
import com.zhuss.common.PageVo;
import com.zhuss.exception.WpsException;
import com.zhuss.exception.ExceptionCode;
import com.zhuss.repair.db.dao.ext.RepairAuditDao;
import com.zhuss.repair.db.dao.ext.RepairDao;
import com.zhuss.repair.db.entity.Repair;


/**
 * 查询餐品 processor
 * @Author: hxx
 * @Date: 2020/02/28 16:01
 */
@Component("repairAuditRead")
public class RepairAuditRead {
	
    @Autowired
    private RepairAuditDao repairAuditDao;
	
	
	/**
	 * 报修单详情
	 */
	/*public Object detail(Integer id) throws WpsException {
		Object result = repairDao.detail(id);
		if (result == null) {
			throw new WpsException(ExceptionCode.数据不存在);
		}
		return result;
	}*/
	
	/**
	 * 报修单列表
	 * @param 时间段
	 * @param 内容
	 */
	public Object list(SearchRepairBo bo) {
		/*List<Repair> result = repairDao.listByTimeContent(bo);*/
		PageVo<ListRepairVo> result = new PageVo<ListRepairVo>();
		result.setPageNum(bo.getPageNum());
        result.setPageSize(bo.getPageSize());
        result.setItems(repairAuditDao.list(bo));
        result.setTotal(repairAuditDao.countList(bo));
		return result;
	}


}
